package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("community")//小区信息表
public class Community extends BaseModel{

    @IsAutoIncrement   //自增
    @Column(comment = "小区ID")//对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    @TableId(type = IdType.AUTO)//mybatis-plus主键注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;


    @Column(comment = "小区名称")
    @TableField("community_name")
    private String communityName;

    @Column(comment = "小区地址")
    private String address;

    @Column(comment = "总栋数")
    @TableField("total_buildings")
    private Integer totalBuildings;

    @Column(comment = "总户数")
    @TableField("total_households")
    private Integer totalHouseholds;

    @Column(comment = "缩略图")
    private String thumbnail;

    @Column(comment = "开发商名称")
    private String developer;

    @Column(comment = "物业公司名称")
    @TableField("estate_company")
    private String estateCompany;

    @Column(comment = "小区创建时间")
    @TableField("create_time")
    private String createTime;
}
